﻿Namespace Catalog
    Public Class Demo
        Public Property Id As Integer
        Public Property Title As String
        Public Property Position As Integer
        Public Property SampleUrl As Uri
        Public Property RtmpStreamUrl As Uri

        Public Shared Function FromBPObject(dem As BPODemo) As Demo
            If dem Is Nothing Then Return Nothing
            Dim newDemo As New Demo()

            newDemo.Id = dem.id
            newDemo.Title = dem.title
            newDemo.Position = dem.position
            newDemo.SampleUrl = New Uri(dem.sampleUrl)
            newDemo.RtmpStreamUrl = New Uri(dem.rtmpStreamUrl)

            Return newDemo
        End Function
    End Class
End Namespace